/**
 * Cylinder inherits from Circle3D it has the methods for calculating
 * surface area and volume.
 */
import java.util.*;
public class Cylinder extends Circle3D {
    //instance variables
    private double height;
    //constructor methods
    public Cylinder(double r, double h) {
        super.setRadius(r);
        height = h;
    }
    public Cylinder() {
        super.setRadius(0.0);
        height = 0.0;
    }
    //getter
    public double getHeight() {
        return height;
    }
    //setter
    public void setHeight(double h) {
        height = h;
    }
    //mutator methods
    public double calcVolume() {
        return super.calcBase() * height;
    }
    public double calcSurfaceArea() {
        return 2 * Math.PI * super.getRadius() * (super.getRadius() + height);
    }
}